def getRouter(admin, user, vip, book, comment, swiper):
    json = {
        "code": 0,
        "data": {
            "path": "/",
            "redirect": "/home",
            "component": "layout/index",
            "children": [
                {
                    "path": "/home",
                    "component": "home",
                    "meta": {
                        "parent": "/home",
                        "icon": "el-icon-s-home",
                        "title": "首页",
                        "affix": True,
                        "hidden": False,
                        "isExternalLinks": False,
                        "externalLinkUrl": None
                    }
                },
                {
                    "path": "/profile",
                    "component": "profile",
                    "meta": {
                        "parent": "/profile",
                        "icon": "el-icon-star-on",
                        "title": "个人中心",
                        "hidden": True
                    }
                },
                {
                    "path": "/demo",
                    "redirect": "/demo/table",
                    "component": "layout/publics",
                    "meta": {
                        "parent": "/demo",
                        "icon": "el-icon-s-custom",
                        "title": "人员管理"
                    },
                    "children": []
                },
                {
                    "path": "/resource",
                    "redirect": "resource/book",
                    "component": "layout/publics",
                    "meta": {
                        "parent": "/resource",
                        "icon": "el-icon-menu",
                        "title": "资源管理"
                    },
                    "children": []
                },
                {
                    "path": "/forms",
                    "redirect": "forms/Activities",
                    "component": "forms/Activities",
                    "meta": {
                        "parent": "/forms",
                        "icon": "el-icon-s-opportunity",
                        "title": "推荐Swiper设置"
                    },
                    "children": []
                }
            ]
        }
    }
    # json['data']['children'][2]['children']
    print(json['data']['children'][2]['children'])
    if(admin):
        json['data']['children'][2]['children'].append(
            {
                "path": "/demo/adminManage",
                "component": "demo/adminManage/index",
                "parentPath": "/demo",
                "meta": {
                    "parent": "/demo",
                    "icon": "el-icon-monitor",
                    "title": "管理员"
                }
            },
        )
    if(user):
        json['data']['children'][2]['children'].append(
            {
                "path": "/demo/table",
                "component": "demo/table/index",
                "parentPath": "/demo",
                "meta": {
                    "parent": "/demo",
                    "icon": "el-icon-thumb",
                    "title": "用户管理"
                }
            }
        )
    if vip:
        json['data']['children'][2]['children'].append(
            {
                "path": "/demo/vipManage",
                "component": "demo/vipManage/index",
                "parentPath": "/demo",
                "meta": {
                    "parent": "/demo",
                    "icon": "el-icon-medal",
                    "title": "会员管理"
                }
            }
        )
    if book:
        json['data']['children'][3]['children'].append(
            {
                "path": "/resource/book",
                "component": "resource/book/index",
                "parentPath": "/resource",
                "meta": {
                    "parent": "/resource",
                    "icon": "el-icon-reading",
                    "title": "听书资源"
                }
            }
        )
    if comment:
        json['data']['children'][3]['children'].append(
            {
                "path": "/resource/pinlun",
                "component": "resource/pinlun/index",
                "parentPath": "/resource",
                "meta": {
                    "parent": "/resource",
                    "icon": "el-icon-tickets",
                    "title": "评论管理"
                }
            }
        )
    if swiper:
        json['data']['children'][4]['children'].append(
            {
                "path": "/forms/Activities",
                "component": "forms/Activities/index",
                "parentPath": "/forms",
                "meta": {
                    "parent": "/forms",
                    "icon": "el-icon-picture-outline",
                    "title": "推荐资源设置"
                }
            }
        )

    print(json['data']['children'])

    return json


# getRouter(True, True, True, True, True, True)
